<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>模板管理 - 编辑广告</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 编辑广告 </h3>
        <ul class="page-breadcrumb breadcrumb">
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 模板管理 <i class="icon-angle-right"></i> </li>
          <li> <a href="/tpl/home">首页内容</a> <i class="icon-angle-right"></i> </li>
          <li>“<?=$this->ht['title'];?>”的广告</a> <i class="icon-angle-right"></i> </li>
          <li>编辑广告</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-12">
        <div class="portlet box blue ">
          <div class="portlet-title">
            <div class="caption"> <i class="icon-reorder"></i> 信息 </div>
            <div class="tools"> <a href="" class="collapse"></a> </div>
          </div>
          <div class="portlet-body form">
            <form class="form-horizontal" role="form" method="post" action="/tpl/savehomead" enctype="multipart/form-data" onSubmit="return chkfrm();">
            <input type="hidden" name="act" value="edit">
            <input type="hidden" name="adid" value="<?=$this->data['adid'];?>">
            <input type="hidden" name="htid" value="<?=$this->ht['htid'];?>">
              <div class="form-body">
                <div class="form-group">
                  <label class="col-md-2 control-label">标题<span class="required">*</span></label>
                  <div class="col-md-6">
                    <input class="form-control" name="title" id="_title" value="<?=$this->data['title'];?>" maxlength="80" type="text">
                    <span class="help-block">80个汉字以内</span> </div>
                </div>
                <div class="form-group">
                  <label class="col-md-2 control-label">跳转网址<span class="required">*</span></label>
                  <div class="col-md-6">
                    <input class="form-control" name="url" id="_url" value="<?=$this->data['url'];?>" type="text">
                    <span class="help-block">必须有http://或则https://前缀</span> </div>
                </div>
                <div class="form-group">
                  <label for="exampleInputFile1" class="col-md-2 control-label">上传广告图片</label>
                  <div class="col-md-9">
                    <input id="exampleInputFile1" name="pic_big" type="file">
                    <p class="help-block">只允许上传JPG图片，2M以内，图片尺寸必须是宽1000像素(px)，高450像素(px)</p>
                    <?php if($this->data['docid']>0 && $this->data['docs'][$this->data['docid']]){?>
                          <p>图片已经存在，<a href="<?=$this->data['docs'][$this->data['docid']];?>" target="_blank">点击查看&gt;&gt;</a></p>
						  <?
						  }
						  ?>
                  </div>
                </div>       
                <div class="form-group">
                  <label class="col-md-2 control-label">广告图片网址</label>
                  <div class="col-md-6">
                    <input class="form-control" name="pic_url" id="_pic_url" value="<?=$this->data['pic_url'];?>" type="text">
                    <span class="help-block">必须有http://或则https://前缀</span> </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-md-2">状态</label>
                  <div class="col-md-10 radio-list">
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios4" class="radio"><span class="">
                      <input name="stat" id="optionsRadios4" value="1"<? if($this->data['stat']==1) echo ' checked';?> type="radio">
                      </span></div>
                    <span class="label label-success">正常</span>
                    </label>
                    <label class="radio-inline">
                    <div id="uniform-optionsRadios5" class="radio"><span>
                      <input name="stat" id="optionsRadios5" value="2"<? if($this->data['stat']==2) echo ' checked';?> type="radio">
                      </span></div>
                    <span class="label label-danger">禁用</span>
                    </label>
                  </div>
                </div>
              </div>
              <div class="form-actions fluid">
                <div class="col-md-offset-3 col-md-9">
                  <button type="submit" class="btn green">提交</button>
                </div>
              </div>
            </form>
          </div>
        </div>
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
	jQuery(document).ready(function() {    
	   App.init();
	});
</script> 
<script type="text/javascript">
function chkfrm(){
	if($("#_title").prop("value")==""){
		alert("请填写标题");
		$("#_title").focus();
		return false;
	}
	
	if($("#_url").prop("value")==""){
		alert("请填写跳转网址");
		$("#_url").focus();
		return false;
	}
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>